home *** CD-ROM | disk | FTP | other *** search
/ Gigarom 1 / Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso / FILES / HYP / J-M / MH Power Scripts v1.3.cpt / MH Power Scripts v1.3 / card_4698.txt < prev    next >
Text File  |  1989-02-26  |  4KB  |  129 lines

  1. -- card: 4698 from stack: in.3
  2. -- bmap block id: 0
  3. -- flags: 4000
  4. -- background id: 2663
  5. -- name: Super Delete
  6.  
  7.  
  8. -- part 1 (button)
  9. -- low flags: 00
  10. -- high flags: A004
  11. -- rect: left=281 top=24 right=61 bottom=335
  12. -- title width / last selected line: 0
  13. -- icon id / first selected line: 0 / 0
  14. -- text alignment: 1
  15. -- font id: 0
  16. -- text size: 12
  17. -- style flags: 0
  18. -- line height: 16
  19. -- part name: Delete
  20. ----- HyperTalk script -----
  21. on copyright
  22.  
  23.   -- Super Delete, Copyright by Mac Help Co., January 1988
  24.   -- by Chris Hostetter, Mac Help Co., 1800 East Market Street
  25.   -- Long Beach, CA  90805, (213) 428-7414
  26.   --      The script for this button is copyrighted and may not be
  27.   --      used without the written permission of the author (above).
  28.  
  29. end copyright
  30.  
  31.  
  32. on mouseUp
  33.   Global SearchTimesFound, Searchstring, TrapFieldName
  34.  
  35.   Answer "What cards do you wish to delete?" with "Flagged" or "This Card" or "Other"
  36.   if it is "Other" then
  37.     Answer "What cards do you wish to delete?" with "Duplicates" or "Range" or "Cancel"
  38.   end if
  39.  
  40.   if it is "Cancel" then exit mouseUp
  41.  
  42.   if it is "This Card" then
  43.     answer "Are you sure you want to delete this card" with "Cancel" or "Delete"
  44.     if it is "Cancel" then exit mouseUp
  45.     visual effect iris close to black
  46.     go to this card
  47.     doMenu "Delete Card"
  48.   end if
  49.  
  50.   if it is "Range" then
  51.     ask "Enter the number of the card you wish to start with?" with "2"
  52.     if it is empty then exit mouseUp
  53.     put it into StartCard
  54.     go to card startCard
  55.     ask "Enter the number of the card you wish to end with?" with the number of cards
  56.     if it is empty then exit mouseUp
  57.     put it into endCard
  58.  
  59.     set cursor to 4
  60.     set lockscreen to true
  61.     repeat with i = startCard to endCard
  62.       doMenu "Delete Card"
  63.     end repeat
  64.   end if
  65.  
  66.   if it is "Flagged" then
  67.     -- CLICK ON THE SUPER FIND BUTTON
  68.     put "All Cards meeting this criteria will be deleted!" into SearchString
  69.     click at the loc of background button "SuperFind: Version 1.1"
  70.     put empty into SearchString
  71.     set cursor to 4
  72.     repeat forever
  73.       if SearchTimesFound is 0 then
  74.         exit repeat
  75.       else
  76.         put the id of this card into ThisID
  77.         put last word of ThisID into ThisID
  78.         if ThisID is not "3722" then doMenu "Delete Card"
  79.       end if
  80.       do Message box
  81.     end repeat
  82.   end if
  83.  
  84.   if it is "Duplicates" then
  85.     beep
  86.     answer "This might take a long time?" with "Cancel" or "OK"
  87.     if it is "Cancel" then exit mouseUp
  88.     set the loc of the message box to 20,300
  89.     put "MOVE pointer inside field to Compare, then press" && "COMMAND KEY down."
  90.     put "Delete" into TrapFieldName
  91.     put empty into LastField
  92.   end if
  93.  
  94. end mouseUp
  95.  
  96.  
  97. -- part 2 (field)
  98. -- low flags: 01
  99. -- high flags: 0004
  100. -- rect: left=340 top=23 right=38 bottom=400
  101. -- title width / last selected line: 0
  102. -- icon id / first selected line: 0 / 0
  103. -- text alignment: 1
  104. -- font id: 3
  105. -- text size: 9
  106. -- style flags: 0
  107. -- line height: 12
  108. -- part name: See Script
  109. ----- HyperTalk script -----
  110. on mouseUp
  111.   edit script of card button "Delete"
  112. end mouseUp
  113.  
  114.  
  115. -- part contents for background part 8
  116. ----- text -----
  117. Card 16 of 20
  118.  
  119. -- part contents for background part 9
  120. ----- text -----
  121. SUPER DELETE
  122. This button has a range of delete options and can be used with the button 'Super Find' do delete flagged information.
  123.  
  124. The cards in this stack are all protected so you don't accidentally delete them, so go ahead and try the delete options.
  125.  
  126.  
  127. -- part contents for card part 2
  128. ----- text -----
  129. See Script